<?php /*
	
*/ ?>
<?php include("system/config.inc.php");
$donotinclude = 1;
if(!isset($_SESSION['adminuserid']))
{
	header("location:index.php?msg=logfirst");
	die();
}
// IF admin is not logged in then it will redirect to the adminlogin page.
if(!isset($_SESSION['adminuserid']))
{
	header("location:adminlogin.php?msg=logfirst");
	die();
}


// Display detail of perticular member
if(isset($_REQUEST['detail']) && trim($_REQUEST['detail'])=='memberdetail')
{
	if(isset($_REQUEST['memberID']) && trim($_REQUEST['memberID']) != "")
	{
		$memberID=$_REQUEST['memberID'];
		
		$sql="select * FROM tblcustomers WHERE intcusid = '$memberID'";
		$sql_member=$obj_db->select($sql);
		if(count($sql_member)>0)
		{
			foreach($sql_member as $row)
			{
			
?>
<?php include("inc/header.php");?>
<body>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="middlebackground">
<tr>
<td align="center" valign="top" ><?php include(INC."top.inc.php");?></td>
</tr>
<tr>
<td valign="top">

<table width="80%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td valign="top"><table align="center" border="0" cellspacing="0" cellpadding="0" class="border" >
  <tr>
    <td class="line_top"><table width="100%" border="0">
      <tr class="tblbg3">
        <td width="89%" height="25" align="center"><span class="style3">Customer Details...</span></td>
        <td width="11%" align="center" class="tblbg3"><a href="#" Title='Click here to Go Back!' onClick="history.go(-1)" class="aa">BACK</a></td>
      </tr>
    </table></td>
  </tr>
  <tr bgcolor="#FFFFCC">
    <td><table border="0" align="center" cellpadding="2" cellspacing="2" bordercolor="#FFFFFF"  bgcolor="#FFF4E8">
      <tr>
        <td width="130" class="font"> <div align="right"><strong>Email </strong></div></td>
        <td width="18" align="center">:</td>
        <td width="314" class="fntstyle"><a Title='Click here to E-Mail Customer' href="mailorder.php?cust=<?php echo $row['intcusid'];?>" style="cursor:hand"><?php echo $row['varcustemail'];?></a></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>Firstname </strong></div></td>
        <td align="center">:</td>
        <td><?php echo $row['varcustfname'];?></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>Lastname </strong></div></td>
       <td align="center">:</td>
       <td><?php echo $row['varcustlname'];?></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>Birthdate </strong></div></td>
       <td align="center">:</td>
       <td><?php echo $row['dtdob'];?></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>Sex </strong></div></td>
       <td align="center">:</td>
       <td><?php echo $row['charcustsex'];?></td>
      </tr>
      <tr>
        <td valign="top"> <div align="right" class="font"><strong>Address</strong></div></td>
       <td align="center" valign="top">:</td>
       <td valign="top"><?php
	   echo 
	   $row['varhouseno']."&nbsp;".$row['varstreetname']."<br />".
	   $row['varcity']."<br />".
	   $row['varstate']."<br />".
	   $row['varpostalcode']."<br />".	
	   $row['varcountry']."<br />";
	   ?></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>News Letter </strong></div></td>
       <td align="center">:</td>
       <td><?php
				if($row['intnewsletter']=='0')
				{
					echo "Not Selected";
				}
				if($row['intnewsletter']=='1')
				{
					echo "Subscribed.";
				}
				if($row['intnewsletter']=='2')
				{
					echo "Not Subscribed.";
				}
			?>		</td>
      </tr>
      <tr>
        <td> <div align="right"><strong>P<span class="font">h</span>one No. </strong></div></td>
        <td align="center">:</td>
        <td><?php echo $row['varcustphone'];?></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>Fax No. </strong></div></td>
        <td align="center">:</td>
        <td><?php echo $row['varcustfax'];?></td>
      </tr>
      <tr>
        <td> <div align="right" class="font"><strong>Registered Date </strong></div></td>
        <td align="center">:</td>
        <td><?php echo printdate($row['dtregtime']);?></td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
</table>

</td>
</tr>
<tr><td align="center">&nbsp;</td>
</tr>
</table>
</body>
</html>
<?php			
			}
		}
	}
}
?>
